package com.slt.android.recreattest;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

public class MainActivity extends Activity implements View.OnClickListener {
    Button btn;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        btn = (Button) findViewById(R.id.btn);
        btn.setOnClickListener(this);
        Log.e("yqrLog" , "onCreate");
    }

    @Override
    protected void onStart() {
        super.onStart();
        Log.e("yqrLog" , "onStart");
    }

    @Override
    protected void onRestart() {
        super.onRestart();
        Log.e("yqrLog" , "onRestart");
    }

    @Override
    protected void onResume() {
        super.onResume();
        Log.e("yqrLog" , "onResume");
    }

    @Override
    protected void onPause() {
        super.onPause();
        Log.e("yqrLog" , "onPause");
    }

    @Override
    protected void onStop() {
        super.onStop();
        Log.e("yqrLog" , "onStop");
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        Log.e("yqrLog" , "onDestroy");
    }

    @Override
    public void onClick(View v) {
        Intent i = new Intent(this , MainActivity.class);
        startActivity(i);
        finish();
    }
}
